-- GENERATED SPELL FOR [Captain Drayzen] --


function spell0_27751(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(42724,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27751', 604, 1)
end

function spell1_27751(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(15708,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27751', 5273, 1)
end

function spell2_27751(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38619,pUnit)
pUnit:RegisterEvent('Sorts_27751', 663, 1)
end

function spell3_27751(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(38618,pUnit)
pUnit:RegisterEvent('Sorts_27751', 2000, 1)
end

function Sorts_27751(pUnit, Event)
local choix_sorts_27751 = math.random(0, 3)
if choix_sorts_27751 == 0 then
pUnit:RegisterEvent('spell0_27751', 1, 1)
end
if choix_sorts_27751 == 1 then
pUnit:RegisterEvent('spell1_27751', 1, 1)
end
if choix_sorts_27751 == 2 then
pUnit:RegisterEvent('spell2_27751', 1, 1)
end
if choix_sorts_27751 == 3 then
pUnit:RegisterEvent('spell3_27751', 1, 1)
end
end

function mob27751_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27751', math.random(1500, 3000), 1)
end

function mob27751_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27751_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27751_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27751, 1, 'mob27751_Action')
RegisterUnitEvent(27751, 2, 'mob27751_Leave')
RegisterUnitEvent(27751, 3, 'mob27751_Kill')
RegisterUnitEvent(27751, 4, 'mob27751_Die')
